package cn.codinglives.demo.order.remote;


import cn.codinglives.demo.order.vo.ProductVO;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;
import org.springframework.web.bind.annotation.RequestParam;

import java.util.List;

@FeignClient(value = "product-service")
public interface ProductService {

    @RequestMapping(value = "/product/stock", method = RequestMethod.GET)
    List<ProductVO> stocks();

    @RequestMapping(value = "/product/deductStock", method = RequestMethod.GET)
    String deductStock(@RequestParam String productId);
}
